import router from "../router/index";
import { getToken } from '../utils/app'
// 路由守卫
const whiteRouter = '/login'
router.beforeEach((to, from, next) => {
    if (to.path === whiteRouter){
        return next()
    }
    if(!getToken())  return next(whiteRouter)
    next()
})